find all possible paths in directed graph